﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NewStart
{
    public partial class About : Form
    {
        public About()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        protected override void OnPaintBackground(PaintEventArgs pevent)
        {
            Graphics g = pevent.Graphics;
            Rectangle rBackground = new Rectangle(0, 0, this.Width, this.Height);
            System.Drawing.Drawing2D.LinearGradientBrush bBackground
               = new System.Drawing.Drawing2D.LinearGradientBrush(rBackground, Color.White, Color.LightGray, 30);
            g.FillRectangle(bBackground, rBackground);
            bBackground.Dispose();
        }

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ClassStyle |= 0x00020000;
                return cp;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (Program.programVersion != ShortcutsHelper.ReadOnlineVersion())
            {
                System.Diagnostics.Process.Start("http://newstart.codeplex.com/");
                this.Close();
            }
            else
                MessageBox.Show("No updates aviable");
        }
    }
}
